﻿<UserControl x:Class="LockCrypt.AutoType.WindowChooser"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:l49ui="clr-namespace:Lime49.UI;assembly=Lime49"
    xmlns:lex="http://schemas.root-project.org/xaml/presentation"
    x:Name="root" Loaded="WindowChooser_Loaded">
    <UserControl.CommandBindings>
        <CommandBinding Command="NavigationCommands.Refresh" Executed="RefreshWindows" />
    </UserControl.CommandBindings>
    <DockPanel Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" LastChildFill="True">
        <l49ui:ImageButton x:Name="btnRefreshWindows" DockPanel.Dock="Right" MinWidth="18" Text="{lex:LocText LockCrypt.Core:Strings:Refresh}" Command="NavigationCommands.Refresh"
                         Image="pack://application:,,,/Resources/images/refresh_16.png" ImageLocation="Left" ShowText="False" />
        <ComboBox x:Name="cboAutoTypeTargetWindow" DockPanel.Dock="Left" HorizontalAlignment="Stretch" IsEditable="True"
                  Text="{Binding SelectedWindow,ElementName=root,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                  ItemsSource="{Binding AvailableWindows,ElementName=root,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
    </DockPanel>
</UserControl>
